/**
 * 产品管理相关类型定义
 */

import type {BaseEntity, PageResponse} from '../common/base'

/**
 * 产品实体
 */
export interface Product extends BaseEntity {
  productCode: string
  productName: string
  productDesc?: string
}

/**
 * 创建产品请求
 */
export interface CreateProductRequest {
  productCode: string
  productName: string
  productDesc?: string
}

/**
 * 更新产品请求
 */
export interface UpdateProductRequest {
  productName?: string
  productDesc?: string
}

/**
 * 产品查询参数
 */
export interface ProductSearchParams {
  productCode?: string
  productName?: string
  page?: number
  size?: number
  sort?: string
  direction?: 'asc' | 'desc'
}

/**
 * 产品分页响应
 */
export type ProductPageResponse = PageResponse<Product>

/**
 * 产品统计信息
 */
export interface ProductStats {
  totalProducts: number
  activeProducts: number
  totalSchemas: number
  totalTables: number
  totalColumns: number
}